<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>搜索列表页(有品牌)</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/style.css"/>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/shopping-mall-index.css"/>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/zhonglin.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/zhongling2.js"></script>

    <script>
        $(function () {
            $("[name='addCart']").click(function () {
                var count = $(this).parent().prev().find($("[name='count']")).text()
                var pId = $(this).parent().prev().find($("[name='count']")).attr("id")
                $.ajax({
                    url: "${pageContext.request.contextPath}/cart/addCart",
                    data: {
                        count: count,
                        pId: pId
                    },
                    success: function (data) {
                        if(data=="ok"){
                            alert("已添加到购物车")
                        }else{
                            alert("添加失败")
                        }
                    }
                })
            })
        })
    </script>

</head>

<body>

<!--header-->
<%@include file="common/header.jsp" %>

<!--logo search weweima-->
<%@include file="common/logoAndSearch.jsp" %>


<!--nav-->
<%@include file="common/nav.jsp" %>

<!--内容开始-->
<!--筛选结果-->
<div class="screening-results w1200">
    <p class="tiao">找到共 ${productByPageBean.rowCount} 条</p>
    <div class="results">
        <p class="re-p1 f-l">
            <c:forEach items="${indexNav}" var="categoryExt">
                <c:if test="${categoryExt.cId==productByPageBean.cId}">
                    <c:set var="cName" value="${categoryExt.cName}"/>
                </c:if>
                <c:forEach items="${categoryExt.categorySecondList}" var="categorySecond">

                    <c:if test="${categorySecond.csId==productByPageBean.csId}">
                        <c:if test="${categoryExt.cId==categorySecond.cId}">
                            <c:set var="cName" value="${categoryExt.cName}"/>
                        </c:if>
                        <c:set var="csName" value="${categorySecond.csName}"/>
                    </c:if>
                </c:forEach>


            </c:forEach>
            全部结果：${cName}
            <c:if test="${productByPageBean.csId!=null}">
                > <span>${csName}</span>
            </c:if>
        </p>

    </div>
</div>
<!--品牌-->
<div class="hover-brand">
    <p class="ho-pingpai f-l">品牌</p>
    <ul class="f-l">
        <li><a href="#"><img src="${pageContext.request.contextPath}/images/hover-br-li-tu1.gif"/></a></li>
        <li><a href="#"><img src="${pageContext.request.contextPath}/images/hover-br-li-tu2.gif"/></a></li>
        <li><a href="#"><img src="${pageContext.request.contextPath}/images/hover-br-li-tu3.gif"/></a></li>
        <li><a href="#"><img src="${pageContext.request.contextPath}/images/hover-br-li-tu4.gif"/></a></li>
        <li><a href="#"><img src="${pageContext.request.contextPath}/images/hover-br-li-tu5.gif"/></a></li>
        <li><a href="#"><img src="${pageContext.request.contextPath}/images/hover-br-li-tu6.gif"/></a></li>
        <li><a href="#"><img src="${pageContext.request.contextPath}/images/hover-br-li-tu7.gif"/></a></li>
        <li><a href="#"><img src="${pageContext.request.contextPath}/images/hover-br-li-tu8.gif"/></a></li>
        <li><a href="#"><img src="${pageContext.request.contextPath}/images/hover-br-li-tu9.gif"/></a></li>
        <li><a href="#"><img src="${pageContext.request.contextPath}/images/hover-br-li-tu10.gif"/></a></li>
        <li><a href="#"><img src="${pageContext.request.contextPath}/images/hover-br-li-tu11.gif"/></a></li>
        <li><a href="#"><img src="${pageContext.request.contextPath}/images/hover-br-li-tu12.gif"/></a></li>
        <li><a href="#"><img src="${pageContext.request.contextPath}/images/hover-br-li-tu13.gif"/></a></li>
        <li><a href="#"><img src="${pageContext.request.contextPath}/images/hover-br-li-tu14.gif"/></a></li>
        <li><a href="#"><img src="${pageContext.request.contextPath}/images/hover-br-li-tu15.gif"/></a></li>
        <li><a href="#"><img src="${pageContext.request.contextPath}/images/hover-br-li-tu16.gif"/></a></li>
        <li><a href="#"><img src="${pageContext.request.contextPath}/images/hover-br-li-tu17.gif"/></a></li>
        <li><a href="#"><img src="${pageContext.request.contextPath}/images/hover-br-li-tu18.gif"/></a></li>
        <div style="clear:both;"></div>
    </ul>
    <div class="duoxuan f-r">
        <button ppgd="">多选</button>
        <a href="JavaScript:;" ppgd="">更多 ∨</a>
    </div>
    <div style="clear:both;"></div>
</div>

<!--品牌 更多-->
<div class="re-brand">
    <div class="brand-top">
        <div class="br-t">
            <p class="pingpai f-l">品牌</p>
            <div class="br-abc f-l">
                <p class="moren f-l">默认</p>
                <ul class="f-l">
                    <li><a href="#">A</a></li>
                    <li><a href="#">B</a></li>
                    <li><a href="#">C</a></li>
                    <li><a href="#">D</a></li>
                    <li><a href="#">E</a></li>
                    <li><a href="#">F</a></li>
                    <li><a href="#">G</a></li>
                    <li><a href="#">H</a></li>
                    <li><a href="#">I</a></li>
                    <li><a href="#">J</a></li>
                    <li><a href="#">K</a></li>
                    <li><a href="#">L</a></li>
                    <li><a href="#">M</a></li>
                    <li><a href="#">N</a></li>
                    <li><a href="#">O</a></li>
                    <li><a href="#">P</a></li>
                    <li><a href="#">Q</a></li>
                    <li><a href="#">R</a></li>
                    <li><a href="#">S</a></li>
                    <li><a href="#">T</a></li>
                    <li><a href="#">U</a></li>
                    <li><a href="#">V</a></li>
                    <li><a href="#">W</a></li>
                    <li><a href="#">X</a></li>
                    <li><a href="#">Y</a></li>
                    <li><a href="#">Z</a></li>
                    <div style="clear:both;"></div>
                </ul>
                <a href="#" class="qita f-l">其他</a>
                <div style="clear:both;"></div>
            </div>
            <div style="clear:both;"></div>
        </div>
        <div class="br-b">
            <ul>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>小老板</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>乐事/Lay's </span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>周黑鸭/ZHOU...</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>喜之郎/STRONG</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>费列罗/FERRERO</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>好丽友/orion</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>莱家/Loacker </span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>稻香村/dao...</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>友臣/YOUCHEN</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>好想你</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>黄飞红/HUANG...</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>可康/COCON</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>张君雅</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>德芙/Dove</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>利奥/Oreo</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>士力架/SNICKERS</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>汉斯/Hunt's</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>多力多滋</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>百草味/Be ...</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>丽芝士/Richeese</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>百吉福/MILKANA</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>利葡/LiPO</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>友谊牌/Tipo</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>百草味/Be ...</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>丽芝士/Richeese</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>百吉福/MILKANA</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>利葡/LiPO</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>友谊牌/Tipo</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>百草味/Be ...</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>丽芝士/Richeese</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>百吉福/MILKANA</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>利葡/LiPO</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>友谊牌/Tipo</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>百草味/Be ...</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>丽芝士/Richeese</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>百吉福/MILKANA</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>利葡/LiPO</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>友谊牌/Tipo</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>百草味/Be ...</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>丽芝士/Richeese</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>百吉福/MILKANA</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>利葡/LiPO</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>友谊牌/Tipo</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>百草味/Be ...</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>丽芝士/Richeese</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>百吉福/MILKANA</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>利葡/LiPO</span>
                </li>
                <li>
                    <input type="checkbox" name="hobby"></input>
                    <span>友谊牌/Tipo</span>
                </li>
                <div style="clear:both;"></div>
            </ul>
        </div>
    </div>
    <div class="brand-bt">
        <button>确定</button>
        <button class="quxiao" quxiao1="">取消</button>
    </div>
</div>

<!--品牌热销-->
<div class="brand-sales">
    <dl>
        <dt>本品牌热销</dt>
        <dd>
            <a href="#">坚果礼品</a>
            <a href="#">碧根果</a>
            <a href="#">松子</a>
            <a href="#">夏威夷果</a>
            <a href="#">核桃</a>
            <a href="#">葡萄干</a>
            <a href="#">花生</a>
            <a href="#">豆类制品</a>
            <a href="#">杏仁</a>
            <a href="#">枣类</a>
            <a href="#">瓜子</a>
            <a href="#">其他坚果</a><a href="#">坚果礼品</a>
            <a href="#">碧根果</a>
            <a href="#">松子</a>
            <a href="#">夏威夷果</a>
            <a href="#">核桃</a>
            <a href="#">葡萄干</a>
            <a href="#">花生</a>
            <a href="#">豆类制品</a>
            <a href="#">杏仁</a>
            <a href="#">枣类</a>
            <a href="#">瓜子</a>
            <a href="#">其他坚果</a>
            <a href="#">坚果礼品</a>
            <a href="#">碧根果</a>
            <a href="#">松子</a>
            <a href="#">夏威夷果</a>
            <a href="#">核桃</a>
            <a href="#">葡萄干</a>
            <a href="#">花生</a>
            <a href="#">豆类制品</a>
            <a href="#">杏仁</a>
            <a href="#">枣类</a>
            <a href="#">瓜子</a>
            <a href="#">其他坚果</a>
            <a href="#">坚果礼品</a>
            <a href="#">碧根果</a>
            <a href="#">松子</a>
            <a href="#">夏威夷果</a>
            <a href="#">核桃</a>
            <a href="#">葡萄干</a>
            <a href="#">花生</a>
            <a href="#">豆类制品</a>
            <a href="#">杏仁</a>
            <a href="#">枣类</a>
            <a href="#">瓜子</a>
            <a href="#">其他坚果</a>
        </dd>
        <div style="clear:both;"></div>
    </dl>
    <dl style="border-bottom:none;">
        <dt>大家都在选</dt>
        <dd>
            <a href="#">坚果礼品</a>
            <a href="#">碧根果</a>
            <a href="#">松子</a>
            <a href="#">夏威夷果</a>
            <a href="#">核桃</a>
            <a href="#">葡萄干</a>
            <a href="#">花生</a>
            <a href="#">豆类制品</a>
            <a href="#">杏仁</a>
            <a href="#">枣类</a>
            <a href="#">瓜子</a>
            <a href="#">其他坚果</a>
        </dd>
        <div style="clear:both;"></div>
    </dl>
</div>

<!--内容↓↑-->
<div class="shop-page-con w1200">
    <div class="shop-pg-left f-l" style="width:215px">
        <div class="shop-left-buttom" style="margin-top:0;">
            <div class="sp-tit1">
                <h3>商品推荐</h3>
            </div>
            <ul class="shop-left-ul">
                <c:forEach items="${isHotProduct}" var="product">
                    <li>
                        <div class="li-top">
                            <a href="#" class="li-top-tu"><img
                                    src="${pageContext.request.contextPath}/${product.image}"
                                    style="widows: 95px;height: 110px"/></a>
                            <p class="jiage"><span class="sp1">￥${product.shopPrice}</span><span
                                    class="sp2">￥${product.marketPrice}</span></p>
                        </div>
                        <p class="miaoshu">${product.pName}</p>
                        <div class="li-md">
                            <div class="md-l f-l">
                                <p class="md-l-l f-l" ap="" name="count" id="${product.pId}">1</p>
                                <div class="md-l-r f-l">
                                    <a href="JavaScript:;" class="md-xs" at="">∧</a>
                                    <a href="JavaScript:;" class="md-xx" ab="">∨</a>
                                </div>
                                <div style="clear:both;"></div>
                            </div>
                            <div class="md-r f-l">
                                <button class="md-l-btn1">立即购买</button>
                                <button class="md-l-btn2" name="addCart">加入购物车</button>
                            </div>
                            <div style="clear:both;"></div>
                        </div>
                        <p class="pingjia">88888评价</p>
                        <p class="weike">爱尚微购自营</p>
                    </li>
                </c:forEach>
            </ul>
        </div>
    </div>
    <div class="shop-pg-right f-r">
        <div class="shop-right-cmp" style="margin-top:0;">
            <ul class="shop-cmp-l f-l">
                <li class="current"><a href="#">综合 ↓</a></li>
                <li><a href="#">销量 ↓</a></li>
                <li><a href="#">新品 ↓</a></li>
                <li><a href="#">评价 ↓</a></li>
                <div style="clear:both;"></div>
            </ul>
            <div class="shop-cmp-m f-l">
                <span>价格</span><input type="text"/><span>-</span><input type="text"/>
            </div>
            <div class="shop-cmp-r f-l">
                <ul class="f-l">
                    <li>
                        <input type="checkbox" name="hobby" value=""></input>
                        <span>包邮</span>
                    </li>
                    <li>
                        <input type="checkbox" name="hobby" value=""></input>
                        <span>进口</span>
                    </li>
                    <li>
                        <input type="checkbox" name="hobby" value=""></input>
                        <span>仅显示有货</span>
                    </li>
                    <li>
                        <input type="checkbox" name="hobby" value=""></input>
                        <span>满赠</span>
                    </li>
                    <li>
                        <input type="checkbox" name="hobby" value=""></input>
                        <span>满减</span>
                    </li>
                    <div style="clear:both;"></div>
                </ul>
                <button>确定</button>
            </div>
            <div style="clear:both;"></div>
        </div>
        <div class="shop-right-con">
            <ul class="shop-ul-tu shop-ul-tu1">
                <c:forEach items="${productByPageBean.list}" var="product" varStatus="vs">
                    <li style="${vs.count%4==0?'margin-right:0;':''}">
                        <div class="li-top">
                            <a href="${pageContext.request.contextPath}/product/toProductView?pId=${product.pId}"
                               class="li-top-tu"><img src="${pageContext.request.contextPath}/${product.image}"
                                                      style="width: 95px;height: 100px"/></a>
                            <p class="jiage"><span class="sp1">￥${product.shopPrice}</span><span
                                    class="sp2">￥${product.marketPrice}</span></p>
                        </div>
                        <p class="miaoshu">${product.pName}</p>
                        <div class="li-md">
                            <div class="md-l f-l">
                                <p class="md-l-l f-l" ap="" name="count" id="${product.pId}">1</p>
                                <div class="md-l-r f-l">
                                    <a href="JavaScript:;" class="md-xs" at="">∧</a>
                                    <a href="JavaScript:;" class="md-xx" ab="">∨</a>
                                </div>
                                <div style="clear:both;"></div>
                            </div>
                            <div class="md-r f-l">
                                <button class="md-l-btn1">立即购买</button>
                                <button class="md-l-btn2" name="addCart">加入购物车</button>
                            </div>
                            <div style="clear:both;"></div>
                        </div>
                        <p class="pingjia">88888评价</p>
                        <p class="weike">爱尚微购自营</p>
                    </li>
                </c:forEach>
                <div style="clear:both;"></div>
            </ul>

            <!--分页-->
            <div class="paging" style="width: 700px">
                <div class="pag-left f-l">
                    <c:if test="${productByPageBean.pageNow>1}">
                        <a href="${pageContext.request.contextPath}/product/toProductList?pageNow=${productByPageBean.pageNow-1}&cId=${productByPageBean.cId}&csId=${productByPageBean.csId}&pName=${productByPageBean.pName}"
                           class="about left-r f-l"><</a>
                    </c:if>
                    <ul class="left-m f-l">
                        <c:forEach items="${productByPageBean.pages}" var="page" varStatus="vs">
                            <li class="${productByPageBean.pageNow==page?'current':''}"><a
                                    href="${pageContext.request.contextPath}/product/toProductList?pageNow=${page}&cId=${productByPageBean.cId}&csId=${productByPageBean.csId}&pName=${productByPageBean.pName}">${page}</a>
                            </li>
                        </c:forEach>
                        <div style="clear:both;"></div>
                    </ul>
                    <c:if test="${productByPageBean.pageNow<productByPageBean.pageCount}">
                        <a href="${pageContext.request.contextPath}/product/toProductList?pageNow=${productByPageBean.pageNow+1}&cId=${productByPageBean.cId}&csId=${productByPageBean.csId}&pName=${productByPageBean.pName}"
                           class="about left-l f-l">></a>
                    </c:if>
                    <div style="clear:both;"></div>
                </div>
                <form action="${pageContext.request.contextPath}/product/toProductList" method="get">
                    <input type="hidden" name="cId" value="${productByPageBean.cId}">
                    <input type="hidden" name="csId" value="${productByPageBean.csId}">
                    <input type="hidden" name="pName" value="${productByPageBean.pName}">
                    <div class="pag-right f-l">
                        <div class="jump-page f-l">
                            到第<input type="number" min="1" max="${productByPageBean.pageCount}" name="pageNow"/>页
                            总计：${productByPageBean.pageCount}页
                        </div>

                        <button class="f-l">确定</button>
                        <div style="clear:both;"></div>
                    </div>
                </form>
                <div style="clear:both;"></div>
            </div>
        </div>
    </div>
    <div style="clear:both;"></div>
</div>

<!--底部一块-->
<%@include file="common/footer.jsp" %>
</body>
</html>
